const debouce = (fun, time = 50) => {
  let timer = 0;
  return function (...args) {
    if (timer) clearTimeout(timer);
    timer = setTimeout(() => {
      fun.apply(fun, args);
    }, time);
  };
};

function con() {
  console.log(1);
}

debouce(con, 5000)();
